log using Heaney_Code_2022-04-14.log

* Michael T. Heaney
* National Protest Events Analysis, 2017-2018
* April 14, 2022

* Code Variables

generate female = 1 if sex == 1
replace female = 0 if sex == 0
replace female = 0 if sex == 2

recode inc (0=0) (1=7.5) (2=20) (3=37.5) (4=62.5) (5=87.5) (6=112.5) (7=137.5) (8=250) (9=450), gen(income)

generate logdistance = log(distance) if distance >= 1
replace logdistance = 0 if distance < 1

recode ideo (9=1) (8=2) (7=3) (6=4) (5=5) (4=6) (3=7) (2=8) (1=9) (10=.), gen(r_ideo)

recode pid (1=3) (2=2) (3=1) (4=0) (5=1) (6=2) (7=3) (8=.), gen(pid_folded)

recode aidimp (1=4) (2=3) (3=2) (4=1) (5=.), gen(r_aidimp)

recode know (1=3) (2=2) (3=1), gen(r_know)

recode intersectionality (1=1) (2=2) (3=3) (4=4) (5=5) (6=.) (7=5), gen(r_intersectionality)

recode demworks (1=4) (2=3) (3=2) (4=1), gen(r_demworks)

recode ang (1=5) (2=4) (3=3) (4=2) (5=1), gen(r_ang)

* Table 1: Event Sample Sizes and BLM Participation

sum CaseID blm if RenumberedEvent == 1
sum CaseID blm if RenumberedEvent == 2
sum CaseID blm if RenumberedEvent == 3 
sum CaseID blm if RenumberedEvent == 4
sum CaseID blm if RenumberedEvent == 5
sum CaseID blm if RenumberedEvent == 6 
sum CaseID blm if RenumberedEvent == 7
sum CaseID blm if RenumberedEvent == 8
sum CaseID blm if RenumberedEvent == 9
sum CaseID blm if RenumberedEvent == 10
sum CaseID blm if RenumberedEvent == 11
sum CaseID blm if RenumberedEvent == 12 
sum CaseID blm if RenumberedEvent == 13
sum CaseID blm if RenumberedEvent == 14 
sum CaseID blm if RenumberedEvent == 15 
sum CaseID blm if RenumberedEvent == 16 
sum CaseID blm if RenumberedEvent == 17
sum CaseID blm if RenumberedEvent == 18
sum CaseID blm if RenumberedEvent == 19 
sum CaseID blm if RenumberedEvent == 20
sum CaseID blm if RenumberedEvent == 21
sum CaseID blm if RenumberedEvent == 22
sum CaseID blm if RenumberedEvent == 23
sum CaseID blm if RenumberedEvent == 24

* Generate Survey Weights for 2017

generate weight = 1.0

* Weights for Event 1: Inagural Counterprotests in Washington, DC, 2017

replace weight  = 0.877075238 if RenumberedEvent==1&sex==0&rwhite==.
replace weight  = 0.993208829 if RenumberedEvent==1&sex==1&rwhite==.
replace weight  = 0.957894737 if RenumberedEvent==1&sex==.&rnative==1
replace weight  = 1.115993868 if RenumberedEvent==1&sex==.&rwhite==1
replace weight  = 1.300000000 if RenumberedEvent==1&sex==.&rblack==1
replace weight  = 1.111842105 if RenumberedEvent==1&sex==.&rasian==1
replace weight  = 0.781954887 if RenumberedEvent==1&sex==.&rlatino==1
replace weight  = 0.760233918 if RenumberedEvent==1&sex==.&rother==1
replace weight  = 1.000000000 if RenumberedEvent==1&rnative==1&sex==0
replace weight  = 1.263157895 if RenumberedEvent==1&rwhite==1&sex==0
replace weight  = 1.596491228 if RenumberedEvent==1&rblack==1&sex==0
replace weight  = 0.957894737 if RenumberedEvent==1&rasian==1&sex==0
replace weight  = 0.821052632 if RenumberedEvent==1&rlatino==1&sex==0
replace weight  = 0.684210526 if RenumberedEvent==1&rother==1&sex==0
replace weight  = 0.684210526 if RenumberedEvent==1&rnative==1&sex==1
replace weight  = 1.026315789 if RenumberedEvent==1&rwhite==1&sex==1
replace weight  = 1.172932331 if RenumberedEvent==1&rblack==1&sex==1
replace weight  = 1.368421053 if RenumberedEvent==1&rasian==1&sex==1
replace weight  = 0.760233918 if RenumberedEvent==1&rlatino==1&sex==1
replace weight  = 0.821052632 if RenumberedEvent==1&rother==1&sex==1

* Weights for Event 2: Women's March on Washington, DC, 2017

replace weight  = 0.843313946 if RenumberedEvent==2&sex==0&rwhite==.
replace weight  = 1.010492333 if RenumberedEvent==2&sex==1&rwhite==.
replace weight  = 0.794188862 if RenumberedEvent==2&sex==.&rnative==1
replace weight  = 1.017119069 if RenumberedEvent==2&sex==.&rwhite==1
replace weight  = 1.191283293 if RenumberedEvent==2&sex==.&rblack==1
replace weight  = 1.164810331 if RenumberedEvent==2&sex==.&rasian==1
replace weight  = 1.072154964 if RenumberedEvent==2&sex==.&rlatino==1
replace weight  = 0.866387849 if RenumberedEvent==2&sex==.&rother==1
replace weight  = 0.794188862 if RenumberedEvent==2&rnative==1&sex==0
replace weight  = 1.107684465 if RenumberedEvent==2&rwhite==1&sex==0
replace weight  = 1.588377724 if RenumberedEvent==2&rblack==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==2&rasian==1&sex==0
replace weight  = 0.794188862 if RenumberedEvent==2&rlatino==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==2&rother==1&sex==0
replace weight  = 0.794188862 if RenumberedEvent==2&rnative==1&sex==1
replace weight  = 0.999005990 if RenumberedEvent==2&rwhite==1&sex==1
replace weight  = 1.111864407 if RenumberedEvent==2&rblack==1&sex==1
replace weight  = 1.111864407 if RenumberedEvent==2&rasian==1&sex==1
replace weight  = 1.141646489 if RenumberedEvent==2&rlatino==1&sex==1
replace weight  = 0.866387849 if RenumberedEvent==2&rother==1&sex==1

* Weights for Event 3: March for Life, Washington, DC, 2017

replace weight  = 0.876369327 if RenumberedEvent==3&sex==0&rwhite==.
replace weight  = 1.166288002 if RenumberedEvent==3&sex==1&rwhite==.
replace weight  = 0.598290598 if RenumberedEvent==3&sex==.&rnative==1
replace weight  = 1.170340381 if RenumberedEvent==3&sex==.&rwhite==1
replace weight  = 5.384615385 if RenumberedEvent==3&sex==.&rblack==1
replace weight  = 1.196581197 if RenumberedEvent==3&sex==.&rasian==1
replace weight  = 1.012491782 if RenumberedEvent==3&sex==.&rlatino==1
replace weight  = 0.897435897 if RenumberedEvent==3&sex==.&rother==1
replace weight  = 0.598290598 if RenumberedEvent==3&rnative==1&sex==0
replace weight  = 1.220512821 if RenumberedEvent==3&rwhite==1&sex==0
replace weight  = 3.290598291 if RenumberedEvent==3&rblack==1&sex==0
replace weight  = 1.495726496 if RenumberedEvent==3&rasian==1&sex==0
replace weight  = 0.747863248 if RenumberedEvent==3&rlatino==1&sex==0
replace weight  = 0.797720798 if RenumberedEvent==3&rother==1&sex==0
replace weight  = 0.598290598 if RenumberedEvent==3&rnative==1&sex==1
replace weight  = 1.131143162 if RenumberedEvent==3&rwhite==1&sex==1
replace weight  = 1.000000000 if RenumberedEvent==3&rblack==1&sex==1
replace weight  = 0.897435897 if RenumberedEvent==3&rasian==1&sex==1
replace weight  = 1.130104463 if RenumberedEvent==3&rlatino==1&sex==1
replace weight  = 0.997150997 if RenumberedEvent==3&rother==1&sex==1

* Weights for Event 4: Tax March on Washington, DC, 2017

replace weight  = 0.852796087 if RenumberedEvent==4&sex==0&rwhite==.
replace weight  = 0.985519438 if RenumberedEvent==4&sex==1&rwhite==.
replace weight  = 0.743315508 if RenumberedEvent==4&sex==.&rnative==1
replace weight  = 0.974725053 if RenumberedEvent==4&sex==.&rwhite==1
replace weight  = 1.486631016 if RenumberedEvent==4&sex==.&rblack==1
replace weight  = 0.991087344 if RenumberedEvent==4&sex==.&rasian==1
replace weight  = 1.238859180 if RenumberedEvent==4&sex==.&rlatino==1
replace weight  = 2.229946524 if RenumberedEvent==4&sex==.&rother==1
replace weight  = 1.000000000 if RenumberedEvent==4&rnative==1&sex==0
replace weight  = 1.040641711 if RenumberedEvent==4&rwhite==1&sex==0
replace weight  = 1.238859180 if RenumberedEvent==4&rblack==1&sex==0
replace weight  = 0.743315508 if RenumberedEvent==4&rasian==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==4&rlatino==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==4&rother==1&sex==0
replace weight  = 0.743315508 if RenumberedEvent==4&rnative==1&sex==1
replace weight  = 0.942230926 if RenumberedEvent==4&rwhite==1&sex==1
replace weight  = 1.734402852 if RenumberedEvent==4&rblack==1&sex==1
replace weight  = 1.486631016 if RenumberedEvent==4&rasian==1&sex==1
replace weight  = 0.991087344 if RenumberedEvent==4&rlatino==1&sex==1
replace weight  = 2.229946524 if RenumberedEvent==4&rother==1&sex==1

* Weights for Event 5: March for Science, Washington, DC, 2017

replace weight  = 0.955128205 if RenumberedEvent==5&sex==0&rwhite==.
replace weight  = 1.009814398 if RenumberedEvent==5&sex==1&rwhite==.
replace weight  = 0.879921260 if RenumberedEvent==5&sex==.&rnative==1
replace weight  = 1.051537108 if RenumberedEvent==5&sex==.&rwhite==1
replace weight  = 0.879921260 if RenumberedEvent==5&sex==.&rblack==1
replace weight  = 1.032951044 if RenumberedEvent==5&sex==.&rasian==1
replace weight  = 0.967913386 if RenumberedEvent==5&sex==.&rlatino==1
replace weight  = 0.879921260 if RenumberedEvent==5&sex==.&rother==1
replace weight  = 0.879921260 if RenumberedEvent==5&rnative==1&sex==0
replace weight  = 1.086028942 if RenumberedEvent==5&rwhite==1&sex==0
replace weight  = 0.879921260 if RenumberedEvent==5&rblack==1&sex==0
replace weight  = 1.143897638 if RenumberedEvent==5&rasian==1&sex==0
replace weight  = 0.953248031 if RenumberedEvent==5&rlatino==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==5&rother==1&sex==0
replace weight  = 0.879921260 if RenumberedEvent==5&rnative==1&sex==1
replace weight  = 1.029147672 if RenumberedEvent==5&rwhite==1&sex==1
replace weight  = 0.879921260 if RenumberedEvent==5&rblack==1&sex==1
replace weight  = 0.947607511 if RenumberedEvent==5&rasian==1&sex==1
replace weight  = 0.989911417 if RenumberedEvent==5&rlatino==1&sex==1
replace weight  = 0.879921260 if RenumberedEvent==5&rother==1&sex==1

* Weights for Event 6: People's Climate March, Washington, DC, 2017

replace weight  = 0.932980600 if RenumberedEvent==6&sex==0&rwhite==.
replace weight  = 0.991096866 if RenumberedEvent==6&sex==1&rwhite==.
replace weight  = 0.851851852 if RenumberedEvent==6&sex==.&rnative==1
replace weight  = 1.016414141 if RenumberedEvent==6&sex==.&rwhite==1
replace weight  = 1.224537037 if RenumberedEvent==6&sex==.&rblack==1
replace weight  = 0.993827160 if RenumberedEvent==6&sex==.&rasian==1
replace weight  = 0.973544974 if RenumberedEvent==6&sex==.&rlatino==1
replace weight  = 1.277777778 if RenumberedEvent==6&sex==.&rother==1
replace weight  = 0.851851852 if RenumberedEvent==6&rnative==1&sex==0
replace weight  = 1.077054066 if RenumberedEvent==6&rwhite==1&sex==0
replace weight  = 1.490740741 if RenumberedEvent==6&rblack==1&sex==0
replace weight  = 1.135802469 if RenumberedEvent==6&rasian==1&sex==0
replace weight  = 0.958333333 if RenumberedEvent==6&rlatino==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==6&rother==1&sex==0
replace weight  = 0.851851852 if RenumberedEvent==6&rnative==1&sex==1
replace weight  = 0.986608077 if RenumberedEvent==6&rwhite==1&sex==1
replace weight  = 1.135802469 if RenumberedEvent==6&rblack==1&sex==1
replace weight  = 0.851851852 if RenumberedEvent==6&rasian==1&sex==1
replace weight  = 0.993827160 if RenumberedEvent==6&rlatino==1&sex==1
replace weight  = 1.064814815 if RenumberedEvent==6&rother==1&sex==1

* Weights for Event 7: Eqaulity March, Washington, DC, 2017

replace weight  = 0.934485360 if RenumberedEvent==7&sex==0&rwhite==.
replace weight  = 0.906943450 if RenumberedEvent==7&sex==1&rwhite==.
replace weight  = 0.712598425 if RenumberedEvent==7&sex==.&rnative==1
replace weight  = 0.978493360 if RenumberedEvent==7&sex==.&rwhite==1
replace weight  = 1.247047244 if RenumberedEvent==7&sex==.&rblack==1
replace weight  = 1.306430446 if RenumberedEvent==7&sex==.&rasian==1
replace weight  = 1.282677165 if RenumberedEvent==7&sex==.&rlatino==1
replace weight  = 0.712598425 if RenumberedEvent==7&sex==.&rother==1
replace weight  = 0.712598425 if RenumberedEvent==7&rnative==1&sex==0
replace weight  = 1.078794838 if RenumberedEvent==7&rwhite==1&sex==0
replace weight  = 1.425196850 if RenumberedEvent==7&rblack==1&sex==0
replace weight  = 1.068897638 if RenumberedEvent==7&rasian==1&sex==0
replace weight  = 1.526996625 if RenumberedEvent==7&rlatino==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==7&rother==1&sex==0
replace weight  = 0.712598425 if RenumberedEvent==7&rnative==1&sex==1
replace weight  = 0.862014224 if RenumberedEvent==7&rwhite==1&sex==1
replace weight  = 0.950131234 if RenumberedEvent==7&rblack==1&sex==1
replace weight  = 1.781496063 if RenumberedEvent==7&rasian==1&sex==1
replace weight  = 1.068897638 if RenumberedEvent==7&rlatino==1&sex==1
replace weight  = 0.712598425 if RenumberedEvent==7&rother==1&sex==1

* Weights for Event 8: Mother of All Rallies, Washington, DC, 2017

replace weight  = 0.842091601 if RenumberedEvent==8&sex==0&rwhite==.
replace weight  = 0.998261595 if RenumberedEvent==8&sex==1&rwhite==.
replace weight  = 0.492385787 if RenumberedEvent==8&sex==.&rnative==1
replace weight  = 1.092593279 if RenumberedEvent==8&sex==.&rwhite==1
replace weight  = 1.336475707 if RenumberedEvent==8&sex==.&rblack==1
replace weight  = 1.107868020 if RenumberedEvent==8&sex==.&rasian==1
replace weight  = 1.477157360 if RenumberedEvent==8&sex==.&rlatino==1
replace weight  = 0.492385787 if RenumberedEvent==8&sex==.&rother==1
replace weight  = 0.492385787 if RenumberedEvent==8&rnative==1&sex==0
replace weight  = 1.118505985 if RenumberedEvent==8&rwhite==1&sex==0
replace weight  = 1.723350254 if RenumberedEvent==8&rblack==1&sex==0
replace weight  = 0.984771574 if RenumberedEvent==8&rasian==1&sex==0
replace weight  = 1.313028765 if RenumberedEvent==8&rlatino==1&sex==0
replace weight  = 0.492385787 if RenumberedEvent==8&rother==1&sex==0
replace weight  = 0.492385787 if RenumberedEvent==8&rnative==1&sex==1
replace weight  = 1.055112400 if RenumberedEvent==8&rwhite==1&sex==1
replace weight  = 0.820642978 if RenumberedEvent==8&rblack==1&sex==1
replace weight  = 1.230964467 if RenumberedEvent==8&rasian==1&sex==1
replace weight  = 1.969543147 if RenumberedEvent==8&rlatino==1&sex==1
replace weight  = 0.492385787 if RenumberedEvent==8&rother==1&sex==1

* Weights for Event 9: Keep Your Promises Rally, Washington, DC, 2017

replace weight  = 0.822018815 if RenumberedEvent==9&sex==0&rwhite==.
replace weight  = 1.018006148 if RenumberedEvent==9&sex==1&rwhite==.
replace weight  = 0.589371981 if RenumberedEvent==9&sex==.&rnative==1
replace weight  = 1.113258186 if RenumberedEvent==9&sex==.&rwhite==1
replace weight  = 0.589371981 if RenumberedEvent==9&sex==.&rblack==1
replace weight  = 0.982286634 if RenumberedEvent==9&sex==.&rasian==1
replace weight  = 0.841959972 if RenumberedEvent==9&sex==.&rlatino==1
replace weight  = 0.589371981 if RenumberedEvent==9&sex==.&rother==1
replace weight  = 0.589371981 if RenumberedEvent==9&rnative==1&sex==0
replace weight  = 1.128584644 if RenumberedEvent==9&rwhite==1&sex==0
replace weight  = 0.589371981 if RenumberedEvent==9&rblack==1&sex==0
replace weight  = 0.589371981 if RenumberedEvent==9&rasian==1&sex==0
replace weight  = 1.178743961 if RenumberedEvent==9&rlatino==1&sex==0
replace weight  = 0.589371981 if RenumberedEvent==9&rother==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==9&rnative==1&sex==1
replace weight  = 1.096506011 if RenumberedEvent==9&rwhite==1&sex==1
replace weight  = 0.589371981 if RenumberedEvent==9&rblack==1&sex==1
replace weight  = 1.178743961 if RenumberedEvent==9&rasian==1&sex==1
replace weight  = 0.707246377 if RenumberedEvent==9&rlatino==1&sex==1
replace weight  = 0.589371981 if RenumberedEvent==9&rother==1&sex==1

* Weights for Event 10: March for Racial Justice, Washington, DC, 2017

replace weight  = 0.949587294 if RenumberedEvent==10&sex==0&rwhite==.
replace weight  = 0.940169437 if RenumberedEvent==10&sex==1&rwhite==.
replace weight  = 1.129852744 if RenumberedEvent==10&sex==.&rnative==1
replace weight  = 0.996928892 if RenumberedEvent==10&sex==.&rwhite==1
replace weight  = 1.129852744 if RenumberedEvent==10&sex==.&rblack==1
replace weight  = 1.016867470 if RenumberedEvent==10&sex==.&rasian==1
replace weight  = 0.932128514 if RenumberedEvent==10&sex==.&rlatino==1
replace weight  = 0.847389558 if RenumberedEvent==10&sex==.&rother==1
replace weight  = 1.694779116 if RenumberedEvent==10&rnative==1&sex==0
replace weight  = 1.151580682 if RenumberedEvent==10&rwhite==1&sex==0
replace weight  = 1.210556512 if RenumberedEvent==10&rblack==1&sex==0
replace weight  = 1.186345382 if RenumberedEvent==10&rasian==1&sex==0
replace weight  = 1.694779116 if RenumberedEvent==10&rlatino==1&sex==0
replace weight  = 0.847389558 if RenumberedEvent==10&rother==1&sex==0
replace weight  = 0.847389558 if RenumberedEvent==10&rnative==1&sex==1
replace weight  = 0.934749307 if RenumberedEvent==10&rwhite==1&sex==1
replace weight  = 1.070386810 if RenumberedEvent==10&rblack==1&sex==1
replace weight  = 0.847389558 if RenumberedEvent==10&rasian==1&sex==1
replace weight  = 0.847389558 if RenumberedEvent==10&rlatino==1&sex==1
replace weight  = 0.847389558 if RenumberedEvent==10&rother==1&sex==1

* Weights for Event 11: March for Life, Washington, DC, 2018

replace weight  = 1.403508772 if RenumberedEvent==11&sex==0&rwhite==.
replace weight  = 1.151515152 if RenumberedEvent==11&sex==1&rwhite==.
replace weight  = 1.000000000 if RenumberedEvent==11&sex==.&rnative==1
replace weight  = 1.225895317 if RenumberedEvent==11&sex==.&rwhite==1
replace weight  = 2.424242424 if RenumberedEvent==11&sex==.&rblack==1
replace weight  = 0.606060606 if RenumberedEvent==11&sex==.&rasian==1
replace weight  = 1.818181818 if RenumberedEvent==11&sex==.&rlatino==1
replace weight  = 1.000000000 if RenumberedEvent==11&sex==.&rother==1
replace weight  = 1.000000000 if RenumberedEvent==11&rnative==1&sex==0
replace weight  = 1.401515152 if RenumberedEvent==11&rwhite==1&sex==0
replace weight  = 1.818181818 if RenumberedEvent==11&rblack==1&sex==0
replace weight  = 0.606060606 if RenumberedEvent==11&rasian==1&sex==0
replace weight  = 1.818181818 if RenumberedEvent==11&rlatino==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==11&rother==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==11&rnative==1&sex==1
replace weight  = 1.125541126 if RenumberedEvent==11&rwhite==1&sex==1
replace weight  = 1.000000000 if RenumberedEvent==11&rblack==1&sex==1
replace weight  = 0.606060606 if RenumberedEvent==11&rasian==1&sex==1
replace weight  = 1.818181818 if RenumberedEvent==11&rlatino==1&sex==1
replace weight  = 1.000000000 if RenumberedEvent==11&rother==1&sex==1

* Weights for Event 12: Women's March, Washington, DC, 2018

replace weight  = 1.154245409 if RenumberedEvent==12&sex==0&rwhite==.
replace weight  = 0.978204553 if RenumberedEvent==12&sex==1&rwhite==.
replace weight  = 0.800904977 if RenumberedEvent==12&sex==.&rnative==1
replace weight  = 1.002659666 if RenumberedEvent==12&sex==.&rwhite==1
replace weight  = 1.228054299 if RenumberedEvent==12&sex==.&rblack==1
replace weight  = 1.201357466 if RenumberedEvent==12&sex==.&rasian==1
replace weight  = 0.873714521 if RenumberedEvent==12&sex==.&rlatino==1
replace weight  = 0.800904977 if RenumberedEvent==12&sex==.&rother==1
replace weight  = 1.000000000 if RenumberedEvent==12&rnative==1&sex==0
replace weight  = 1.186525892 if RenumberedEvent==12&rwhite==1&sex==0
replace weight  = 1.601809955 if RenumberedEvent==12&rblack==1&sex==0
replace weight  = 0.800904977 if RenumberedEvent==12&rasian==1&sex==0
replace weight  = 0.800904977 if RenumberedEvent==12&rlatino==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==12&sex==0
replace weight  = 0.800904977 if RenumberedEvent==12&rnative==1&sex==1
replace weight  = 0.954925165 if RenumberedEvent==12&rwhite==1&sex==1
replace weight  = 1.170553428 if RenumberedEvent==12&rblack==1&sex==1
replace weight  = 1.601809955 if RenumberedEvent==12&rasian==1&sex==1
replace weight  = 0.901018100 if RenumberedEvent==12&rlatino==1&sex==1
replace weight  = 0.800904977 if RenumberedEvent==12&rother==1&sex==1

* Weights for Event 13 -- Impeachment March, Washington, DC, 2018

replace weight  = 0.968978102 if RenumberedEvent==13&sex==0&rwhite==.
replace weight  = 1.041289901 if RenumberedEvent==13&sex==1&rwhite==.
replace weight  = 0.861313869 if RenumberedEvent==13&sex==.&rnative==1
replace weight  = 1.000235460 if RenumberedEvent==13&sex==.&rwhite==1
replace weight  = 1.291970803 if RenumberedEvent==13&sex==.&rblack==1
replace weight  = 0.861313869 if RenumberedEvent==13&sex==.&rasian==1
replace weight  = 0.861313869 if RenumberedEvent==13&sex==.&rlatino==1
replace weight  = 1.435523114 if RenumberedEvent==13&sex==.&rother==1
replace weight  = 0.861313869 if RenumberedEvent==13&rnative==1&sex==0
replace weight  = 0.987977673 if RenumberedEvent==13&rwhite==1&sex==0
replace weight  = 0.861313869 if RenumberedEvent==13&rblack==1&sex==0
replace weight  = 0.861313869 if RenumberedEvent==13&rasian==1&sex==0
replace weight  = 0.861313869 if RenumberedEvent==13&rlatino==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==13&rother==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==13&rnative==1&sex==1
replace weight  = 1.007299270 if RenumberedEvent==13&rwhite==1&sex==1
replace weight  = 1.000000000 if RenumberedEvent==13&rblack==1&sex==1
replace weight  = 0.861313869 if RenumberedEvent==13&rasian==1&sex==1
replace weight  = 0.861313869 if RenumberedEvent==13&rlatino==1&sex==1
replace weight  = 1.435523114 if RenumberedEvent==13&rother==1&sex==1

* Weights for Event 14 -- March for Trump, Washington, DC, 2018

replace weight  = 1.057851240 if RenumberedEvent==14&sex==0&rwhite==.
replace weight  = 0.969696970 if RenumberedEvent==14&sex==1&rwhite==.
replace weight  = 1.000000000 if RenumberedEvent==14&sex==.&rnative==1
replace weight  = 1.272727273 if RenumberedEvent==14&sex==.&rwhite==1
replace weight  = 1.000000000 if RenumberedEvent==14&sex==.&rblack==1
replace weight  = 0.727272727 if RenumberedEvent==14&sex==.&rasian==1
replace weight  = 0.727272727 if RenumberedEvent==14&sex==.&rlatino==1
replace weight  = 0.727272727 if RenumberedEvent==14&sex==.&rother==1
replace weight  = 1.000000000 if RenumberedEvent==14&rnative==1&sex==0
replace weight  = 1.333333333 if RenumberedEvent==14&rwhite==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==14&rblack==1&sex==0
replace weight  = 0.727272727 if RenumberedEvent==14&rasian==1&sex==0
replace weight  = 0.727272727 if RenumberedEvent==14&rlatino==1&sex==0
replace weight  = 0.727272727 if RenumberedEvent==14&rother==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==14&rnative==1&sex==1
replace weight  = 1.090909091 if RenumberedEvent==14&rwhite==1&sex==1
replace weight  = 1.000000000 if RenumberedEvent==14&rblack==1&sex==1
replace weight  = 1.000000000 if RenumberedEvent==14&rasian==1&sex==1
replace weight  = 0.727272727 if RenumberedEvent==14&rlatino==1&sex==1
replace weight  = 1.000000000 if RenumberedEvent==14&rother==1&sex==1

* Weights for Event 15 -- March for Our Lives, Washington, DC, 2018

replace weight  = 1.116516517 if RenumberedEvent==15&sex==0&rwhite==.
replace weight  = 0.993822394 if RenumberedEvent==15&sex==1&rwhite==.
replace weight  = 1.159459459 if RenumberedEvent==15&sex==.&rnative==1
replace weight  = 1.029230317 if RenumberedEvent==15&sex==.&rwhite==1
replace weight  = 1.174918919 if RenumberedEvent==15&sex==.&rblack==1
replace weight  = 0.927567568 if RenumberedEvent==15&sex==.&rasian==1
replace weight  = 0.927567568 if RenumberedEvent==15&sex==.&rlatino==1
replace weight  = 1.030630631 if RenumberedEvent==15&sex==.&rother==1
replace weight  = 0.772972973 if RenumberedEvent==15&rnative==1&sex==0
replace weight  = 1.130830831 if RenumberedEvent==15&rwhite==1&sex==0
replace weight  = 1.739189189 if RenumberedEvent==15&rblack==1&sex==0
replace weight  = 0.966216216 if RenumberedEvent==15&rasian==1&sex==0
replace weight  = 0.772972973 if RenumberedEvent==15&rlatino==1&sex==0
replace weight  = 0.772972973 if RenumberedEvent==15&rother==1&sex==0
replace weight  = 1.545945946 if RenumberedEvent==15&rnative==1&sex==1
replace weight  = 0.987027027 if RenumberedEvent==15&rwhite==1&sex==1
replace weight  = 1.067438867 if RenumberedEvent==15&rblack==1&sex==1
replace weight  = 0.909379968 if RenumberedEvent==15&rasian==1&sex==1
replace weight  = 0.983783784 if RenumberedEvent==15&rlatino==1&sex==1
replace weight  = 1.159459459 if RenumberedEvent==15&rother==1&sex==1

* Weights for Event 16 -- March for Science, Washington, DC, 2018 

replace weight  =  1.126408010 if RenumberedEvent==16&sex==0&rwhite==.
replace weight  =  0.932469935 if RenumberedEvent==16&sex==1&rwhite==.
replace weight  =  0.765957447 if RenumberedEvent==16&sex==.&rnative==1
replace weight  =  0.995744681 if RenumberedEvent==16&sex==.&rwhite==1
replace weight  =  1.148936170 if RenumberedEvent==16&sex==.&rblack==1
replace weight  =  0.835589942 if RenumberedEvent==16&sex==.&rasian==1
replace weight  =  1.531914894 if RenumberedEvent==16&sex==.&rlatino==1
replace weight  =  0.984802432 if RenumberedEvent==16&sex==.&rother==1
replace weight  =  1.000000000 if RenumberedEvent==16&rnative==1&sex==0
replace weight  =  1.114119923 if RenumberedEvent==16&rwhite==1&sex==0
replace weight  =  2.297872340 if RenumberedEvent==16&rblack==1&sex==0
replace weight  =  0.765957447 if RenumberedEvent==16&rasian==1&sex==0
replace weight  =  2.297872340 if RenumberedEvent==16&rlatino==1&sex==0
replace weight  =  0.765957447 if RenumberedEvent==16&rother==1&sex==0
replace weight  =  1.000000000 if RenumberedEvent==16&rnative==1&sex==1
replace weight  =  0.916827853 if RenumberedEvent==16&rwhite==1&sex==1
replace weight  =  0.984802432 if RenumberedEvent==16&rblack==1&sex==1
replace weight  =  0.875379939 if RenumberedEvent==16&rasian==1&sex==1
replace weight  =  1.276595745 if RenumberedEvent==16&rlatino==1&sex==1
replace weight  =  1.021276596 if RenumberedEvent==16&rother==1&sex==1

* Weights for Event 17 -- March for the Ocean, Washington, DC, 2018 

replace weight  = 1.144736842 if RenumberedEvent==17&sex==0&rwhite==.
replace weight  = 0.943540670 if RenumberedEvent==17&sex==1&rwhite==.
replace weight  = 0.763157895 if RenumberedEvent==17&sex==.&rnative==1
replace weight  = 1.000862813 if RenumberedEvent==17&sex==.&rwhite==1
replace weight  = 0.953947368 if RenumberedEvent==17&sex==.&rblack==1
replace weight  = 0.763157895 if RenumberedEvent==17&sex==.&rasian==1
replace weight  = 1.526315789 if RenumberedEvent==17&sex==.&rlatino==1
replace weight  = 1.221052632 if RenumberedEvent==17&sex==.&rother==1
replace weight  = 1.000000000 if RenumberedEvent==17&rnative==1&sex==0
replace weight  = 1.162907268 if RenumberedEvent==17&rwhite==1&sex==0
replace weight  = 0.763157895 if RenumberedEvent==17&rblack==1&sex==0
replace weight  = 0.763157895 if RenumberedEvent==17&rasian==1&sex==0
replace weight  = 1.526315789 if RenumberedEvent==17&rlatino==1&sex==0
replace weight  = 1.526315789 if RenumberedEvent==17&rother==1&sex==0
replace weight  = 0.763157895 if RenumberedEvent==17&rnative==1&sex==1
replace weight  = 0.915789474 if RenumberedEvent==17&rwhite==1&sex==1
replace weight  = 1.144736842 if RenumberedEvent==17&rblack==1&sex==1
replace weight  = 0.763157895 if RenumberedEvent==17&rasian==1&sex==1
replace weight  = 1.526315789 if RenumberedEvent==17&rlatino==1&sex==1
replace weight  = 1.144736842 if RenumberedEvent==17&rother==1&sex==1

* Weights for Event 18 -- Families Belong Together, Washington, DC, 2018 

replace weight  = 1.062326389 if RenumberedEvent==18&sex==0&rwhite==.
replace weight  = 0.984224319 if RenumberedEvent==18&sex==1&rwhite==.
replace weight  = 0.879166667 if RenumberedEvent==18&sex==.&rnative==1
replace weight  = 0.983567708 if RenumberedEvent==18&sex==.&rwhite==1
replace weight  = 1.067559524 if RenumberedEvent==18&sex==.&rblack==1
replace weight  = 1.172222222 if RenumberedEvent==18&sex==.&rasian==1
replace weight  = 1.004761905 if RenumberedEvent==18&sex==.&rlatino==1
replace weight  = 1.055000000 if RenumberedEvent==18&sex==.&rother==1
replace weight  = 0.879166667 if RenumberedEvent==18&rnative==1&sex==0
replace weight  = 1.036965812 if RenumberedEvent==18&rwhite==1&sex==0
replace weight  = 1.172222222 if RenumberedEvent==18&rblack==1&sex==0
replace weight  = 1.172222222 if RenumberedEvent==18&rasian==1&sex==0
replace weight  = 0.879166667 if RenumberedEvent==18&rlatino==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==18&rother==1&sex==0
replace weight  = 0.879166667 if RenumberedEvent==18&rnative==1&sex==1
replace weight  = 0.966356749 if RenumberedEvent==18&rwhite==1&sex==1
replace weight  = 1.039015152 if RenumberedEvent==18&rblack==1&sex==1
replace weight  = 1.172222222 if RenumberedEvent==18&rasian==1&sex==1
replace weight  = 1.025694444 if RenumberedEvent==18&rlatino==1&sex==1
replace weight  = 0.879166667 if RenumberedEvent==18&rother==1&sex==1

* Weights for Event 19 -- Youth Climate March, Washington, DC, 2018 

replace weight  = 1.258541090 if RenumberedEvent==19&sex==0&rwhite==.
replace weight  = 0.896262395 if RenumberedEvent==19&sex==1&rwhite==.
replace weight  = 1.923976608 if RenumberedEvent==19&sex==.&rnative==1
replace weight  = 0.924508240 if RenumberedEvent==19&sex==.&rwhite==1
replace weight  = 1.236842105 if RenumberedEvent==19&sex==.&rblack==1
replace weight  = 1.236842105 if RenumberedEvent==19&sex==.&rasian==1
replace weight  = 1.236842105 if RenumberedEvent==19&sex==.&rlatino==1
replace weight  = 1.000000000 if RenumberedEvent==19&sex==.&rother==1
replace weight  = 2.061403509 if RenumberedEvent==19&rnative==1&sex==0
replace weight  = 0.989473684 if RenumberedEvent==19&rwhite==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==19&rblack==1&sex==0
replace weight  = 1.649122807 if RenumberedEvent==19&rasian==1&sex==0
replace weight  = 1.649122807 if RenumberedEvent==19&rlatino==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==19&rother==1&sex==0
replace weight  = 1.649122807 if RenumberedEvent==19&rnative==1&sex==1
replace weight  = 0.870370370 if RenumberedEvent==19&rwhite==1&sex==1
replace weight  = 0.824561404 if RenumberedEvent==19&rblack==1&sex==1
replace weight  = 0.824561404 if RenumberedEvent==19&rasian==1&sex==1
replace weight  = 0.824561404 if RenumberedEvent==19&rlatino==1&sex==1
replace weight  = 1.000000000 if RenumberedEvent==19&rother==1&sex==1

* Weights for Event 20 -- Unite the Right, Washington, DC, 2018 

replace weight  = 1.000000000 if RenumberedEvent==20&sex==0&rwhite==.
replace weight  = 1.000000000 if RenumberedEvent==20&sex==1&rwhite==.
replace weight  = 1.000000000 if RenumberedEvent==20&sex==.&rnative==1
replace weight  = 1.000000000 if RenumberedEvent==20&sex==.&rwhite==1
replace weight  = 1.000000000 if RenumberedEvent==20&sex==.&rblack==1
replace weight  = 1.000000000 if RenumberedEvent==20&sex==.&rasian==1
replace weight  = 1.000000000 if RenumberedEvent==20&sex==.&rlatino==1
replace weight  = 1.000000000 if RenumberedEvent==20&sex==.&rother==1
replace weight  = 1.000000000 if RenumberedEvent==20&rnative==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==20&rwhite==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==20&rblack==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==20&rasian==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==20&rlatino==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==20&rother==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==20&rnative==1&sex==1
replace weight  = 1.000000000 if RenumberedEvent==20&rwhite==1&sex==1
replace weight  = 1.000000000 if RenumberedEvent==20&rblack==1&sex==1
replace weight  = 1.000000000 if RenumberedEvent==20&rasian==1&sex==1
replace weight  = 1.000000000 if RenumberedEvent==20&rlatino==1&sex==1
replace weight  = 1.000000000 if RenumberedEvent==20&rother==1&sex==1

* Weights for Event 21 -- Still Here, Still Strong, Washington, DC, 2018

replace weight  = 1.215217391 if RenumberedEvent==21&sex==0&rwhite==.
replace weight  = 0.904347826 if RenumberedEvent==21&sex==1&rwhite==.
replace weight  = 0.747826087 if RenumberedEvent==21&sex==.&rnative==1
replace weight  = 0.974844720 if RenumberedEvent==21&sex==.&rwhite==1
replace weight  = 1.346086957 if RenumberedEvent==21&sex==.&rblack==1
replace weight  = 1.495652174 if RenumberedEvent==21&sex==.&rasian==1
replace weight  = 1.046956522 if RenumberedEvent==21&sex==.&rlatino==1
replace weight  = 1.000000000 if RenumberedEvent==21&sex==.&rother==1
replace weight  = 0.747826087 if RenumberedEvent==21&rnative==1&sex==0
replace weight  = 1.139544513 if RenumberedEvent==21&rwhite==1&sex==0
replace weight  = 1.371014493 if RenumberedEvent==21&rblack==1&sex==0
replace weight  = 1.495652174 if RenumberedEvent==21&rasian==1&sex==0
replace weight  = 1.246376812 if RenumberedEvent==21&rlatino==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==21&rother==1&sex==0
replace weight  = 0.747826087 if RenumberedEvent==21&rnative==1&sex==1
replace weight  = 0.876024845 if RenumberedEvent==21&rwhite==1&sex==1
replace weight  = 1.308695652 if RenumberedEvent==21&rblack==1&sex==1
replace weight  = 1.000000000 if RenumberedEvent==21&rasian==1&sex==1
replace weight  = 0.747826087 if RenumberedEvent==21&rlatino==1&sex==1
replace weight  = 1.000000000 if RenumberedEvent==21&rother==1&sex==1

* Weights for Event 22 -- Rise Up, Fight Back, Washington, DC, 2018

replace weight  = 1.105978261 if RenumberedEvent==22&sex==0&rwhite==.
replace weight  = 0.930147059 if RenumberedEvent==22&sex==1&rwhite==.
replace weight  = 0.687500000 if RenumberedEvent==22&sex==.&rnative==1
replace weight  = 0.982142857 if RenumberedEvent==22&sex==.&rwhite==1
replace weight  = 2.062500000 if RenumberedEvent==22&sex==.&rblack==1
replace weight  = 0.687500000 if RenumberedEvent==22&sex==.&rasian==1
replace weight  = 1.145833333 if RenumberedEvent==22&sex==.&rlatino==1
replace weight  = 0.687500000 if RenumberedEvent==22&sex==.&rother==1
replace weight  = 0.687500000 if RenumberedEvent==22&rnative==1&sex==0
replace weight  = 0.993055556 if RenumberedEvent==22&rwhite==1&sex==0
replace weight  = 4.125000000 if RenumberedEvent==22&rblack==1&sex==0
replace weight  = 1.000000000 if RenumberedEvent==22&rasian==1&sex==0
replace weight  = 1.375000000 if RenumberedEvent==22&rlatino==1&sex==0
replace weight  = 0.687500000 if RenumberedEvent==22&rother==1&sex==0
replace weight  = 0.687500000 if RenumberedEvent==22&rnative==1&sex==1
replace weight  = 0.962500000 if RenumberedEvent==22&rwhite==1&sex==1
replace weight  = 1.031250000 if RenumberedEvent==22&rblack==1&sex==1
replace weight  = 0.687500000 if RenumberedEvent==22&rasian==1&sex==1
replace weight  = 1.031250000 if RenumberedEvent==22&rlatino==1&sex==1
replace weight  = 0.687500000 if RenumberedEvent==22&rother==1&sex==1

* Weights for Event 23 -- Mother of All Rallies, Washington, DC, 2018, Washington, DC, 2018

replace weight  = 1.111111111 if RenumberedEvent==23&sex==0&rwhite==.
replace weight  = 0.900469202 if RenumberedEvent==23&sex==1&rwhite==.
replace weight  = 0.582010582 if RenumberedEvent==23&sex==.&rnative==1
replace weight  = 1.039304611 if RenumberedEvent==23&sex==.&rwhite==1
replace weight  = 1.455026455 if RenumberedEvent==23&sex==.&rblack==1
replace weight  = 1.358024691 if RenumberedEvent==23&sex==.&rasian==1
replace weight  = 1.047619048 if RenumberedEvent==23&sex==.&rlatino==1
replace weight  = 0.776014109 if RenumberedEvent==23&sex==.&rother==1
replace weight  = 0.582010582 if RenumberedEvent==23&rnative==1&sex==0
replace weight  = 1.112286890 if RenumberedEvent==23&rwhite==1&sex==0
replace weight  = 1.164021164 if RenumberedEvent==23&rblack==1&sex==0
replace weight  = 1.455026455 if RenumberedEvent==23&rasian==1&sex==0
replace weight  = 1.746031746 if RenumberedEvent==23&rlatino==1&sex==0
replace weight  = 1.164021164 if RenumberedEvent==23&rother==1&sex==0
replace weight  = 0.582010582 if RenumberedEvent==23&rnative==1&sex==1
replace weight  = 0.955094288 if RenumberedEvent==23&rwhite==1&sex==1
replace weight  = 1.000000000 if RenumberedEvent==23&rblack==1&sex==1
replace weight  = 1.164021164 if RenumberedEvent==23&rasian==1&sex==1
replace weight  = 0.873015873 if RenumberedEvent==23&rlatino==1&sex==1
replace weight  = 0.582010582 if RenumberedEvent==23&rother==1&sex==1

* Weights for Event 24 -- Women's March on the Pentagon, Washington, DC, 2018, Washington, DC, 2018

replace weight  = 1.106319978 if RenumberedEvent==24&sex==0&rwhite==.
replace weight  = 0.926067307 if RenumberedEvent==24&sex==1&rwhite==.
replace weight  = 0.868713841 if RenumberedEvent==24&sex==.&rnative==1
replace weight  = 1.013499481 if RenumberedEvent==24&sex==.&rwhite==1
replace weight  = 1.114849429 if RenumberedEvent==24&sex==.&rblack==1
replace weight  = 1.520249221 if RenumberedEvent==24&sex==.&rasian==1
replace weight  = 0.923008456 if RenumberedEvent==24&sex==.&rlatino==1
replace weight  = 0.844582901 if RenumberedEvent==24&sex==.&rother==1
replace weight  = 1.140186916 if RenumberedEvent==24&rnative==1&sex==0
replace weight  = 1.119072343 if RenumberedEvent==24&rwhite==1&sex==0
replace weight  = 1.182416061 if RenumberedEvent==24&rblack==1&sex==0
replace weight  = 0.950155763 if RenumberedEvent==24&rasian==1&sex==0
replace weight  = 1.013499481 if RenumberedEvent==24&rlatino==1&sex==0
replace weight  = 1.064174455 if RenumberedEvent==24&rother==1&sex==0
replace weight  = 0.760124611 if RenumberedEvent==24&rnative==1&sex==1
replace weight  = 0.936719217 if RenumberedEvent==24&rwhite==1&sex==1
replace weight  = 1.013499481 if RenumberedEvent==24&rblack==1&sex==1
replace weight  = 1.000000000 if RenumberedEvent==24&rasian==1&sex==1
replace weight  = 0.880144286 if RenumberedEvent==24&rlatino==1&sex==1
replace weight  = 0.760124611 if RenumberedEvent==24&rother==1&sex==1

* Set Survey Weights

svyset [pweight=weight]

* Figure 1: Where did BLM activists originate their activism?

svy: mean FE_BLM
svy: mean FE_BLM if blm ==1

svy: mean CaseID if FE_ProBlackAntiRacism == 1 
svy: mean CaseID if FE_Peace_Antiwar == 1
svy: mean CaseID if FE_Science == 1 | FE_OccupyInequality == 1 | FE_GlobalJustice == 1 | FE_ProImmigRefugees == 1 | /*
	*/ FE_LGBT_HIV == 1 | FE_Labor == 1 | FE_PCanditate_AntiCCandidate == 1 | FE_OProgressive == 1 
svy: mean CaseID if FE_Environment == 1 
svy: mean CaseID if FE_Womens_ProAbortion == 1 
svy: mean CaseID if FE_ProLife == 1 | FE_OConservative == 1

svy: mean blm if FE_ProBlackAntiRacism == 1 
svy: mean blm if FE_Peace_Antiwar == 1
svy: mean blm if FE_Science == 1 | FE_OccupyInequality == 1 | FE_GlobalJustice == 1 | FE_ProImmigRefugees == 1 | /*
	*/ FE_LGBT_HIV == 1 | FE_Labor == 1 | FE_PCanditate_AntiCCandidate == 1 | FE_OProgressive == 1 
svy: mean blm if FE_Environment == 1 
svy: mean blm if FE_Womens_ProAbortion == 1 
svy: mean blm if FE_ProLife == 1 | FE_OConservative == 1

sum blm if FE_ProBlackAntiRacism == 1 
sum blm if FE_Peace_Antiwar == 1
sum blm if FE_Science == 1 | FE_OccupyInequality == 1 | FE_GlobalJustice == 1 | FE_ProImmigRefugees == 1 | /*
	*/ FE_LGBT_HIV == 1 | FE_Labor == 1 | FE_PCanditate_AntiCCandidate == 1 | FE_OProgressive == 1 
sum blm if FE_Environment == 1 
sum blm if FE_Womens_ProAbortion == 1 
sum blm if FE_ProLife == 1 | FE_OConservative == 1

* Table 2: Demographics and Identities

impute rblack rlatino rasian rother female age_numeric educ income logdistance r_ideo pid_folded member r_aidimp r_know Conservative_Event Month if blm !=., gen(i_rblack)
replace i_rblack = 0 if i_rblack < 0 & blm !=.
replace i_rblack = 1 if i_rblack > 1 & blm !=.
impute rlatino rblack rasian rother female age_numeric educ income logdistance r_ideo pid_folded member r_aidimp r_know Conservative_Event Month if blm !=., gen(i_rlatino)
replace i_rlatino = 0 if i_rlatino < 0 & blm !=.
replace i_rlatino = 1 if i_rlatino > 1 & blm !=.
impute rasian rblack rlatino rother female age_numeric educ income logdistance r_ideo pid_folded member r_aidimp r_know Conservative_Event Month if blm !=., gen(i_rasian)
replace i_rasian = 0 if i_rasian < 0 & blm !=.
replace i_rasian = 1 if i_rasian > 1 & blm !=.
impute rother rblack rlatino rasian female age_numeric educ income logdistance r_ideo pid_folded member r_aidimp r_know Conservative_Event Month if blm !=., gen(i_rother)
replace i_rother = 0 if i_rother < 0 & blm !=.
replace i_rother = 1 if i_rother > 1 & blm !=.
impute female rblack rlatino rasian rother age_numeric educ income logdistance r_ideo pid_folded member r_aidimp r_know Conservative_Event Month if blm !=., gen(i_female)
replace i_female = 0 if i_female < 0 & blm !=.
replace i_female = 1 if i_female > 1 & blm !=.
impute age_numeric rblack rlatino rasian rother female educ income logdistance r_ideo pid_folded member r_aidimp r_know Conservative_Event Month if blm !=., gen(i_age_numeric)
replace i_age_numeric = 0 if i_age_numeric < 0 & blm !=.
impute educ rblack rlatino rasian rother female age_numeric income logdistance r_ideo pid_folded member r_aidimp r_know Conservative_Event Month if blm !=., gen(i_educ)
replace i_educ = 1 if i_educ < 1 & blm !=.
replace i_educ = 6 if i_educ > 6 & blm !=.
impute income rblack rlatino rasian rother female age_numeric educ logdistance r_ideo pid_folded member r_aidimp r_know Conservative_Event Month if blm !=., gen(i_income)
replace i_income = 0 if i_income < 0 & blm !=.
impute logdistance rblack rlatino rasian rother female age_numeric educ income r_ideo pid_folded member r_aidimp r_know Conservative_Event Month if blm !=., gen(i_logdistance)
replace i_logdistance = 0 if i_logdistance < 0 & blm !=.
impute r_ideo rblack rlatino rasian rother female age_numeric educ income logdistance pid_folded member r_aidimp r_know Conservative_Event Month if blm !=., gen(i_r_ideo)
replace i_r_ideo = 1 if i_r_ideo < 1 & blm !=.
replace i_r_ideo = 9 if i_r_ideo > 9 & blm !=.
impute pid_folded rblack rlatino rasian rother female age_numeric educ income logdistance r_ideo member r_aidimp r_know Conservative_Event Month if blm !=., gen(i_pid_folded)
replace i_pid_folded = 0 if i_pid_folded < 0 & blm !=.
replace i_pid_folded = 3 if i_pid_folded > 3 & blm !=.
impute member rblack rlatino rasian rother female age_numeric educ income logdistance r_ideo pid_folded r_aidimp r_know Conservative_Event Month if blm !=., gen(i_member)
replace i_member = 1 if i_member > 1 & blm !=.
replace i_member = 0 if i_member < 0 & blm !=.
impute r_aidimp rblack rlatino rasian rother female age_numeric educ income logdistance r_ideo pid_folded member r_know Conservative_Event Month if blm !=., gen(i_r_aidimp)
replace i_r_aidimp = 1 if i_r_aidimp < 1 & blm !=.
replace i_r_aidimp = 4 if i_r_aidimp > 4 & blm !=.
impute r_know rblack rlatino rasian rother female age_numeric educ income logdistance r_ideo pid_folded member r_aidimp Conservative_Event Month if blm !=., gen(i_r_know)
replace i_r_know = 1 if i_r_know < 1 & blm !=.
replace i_r_know = 3 if i_r_know > 3 & blm !=.

svyset [pweight=weight], strata(RenumberedEvent)

svy: mean i_rblack if blm==1
svy: mean i_rlatino if blm==1
svy: mean i_rasian if blm==1
svy: mean i_rother if blm==1
svy: mean i_female if blm==1
svy: mean i_age_numeric if blm==1
svy: mean i_educ if blm==1
svy: mean i_income if blm==1
svy: mean i_logdistance if blm==1
svy: mean i_r_ideo if blm==1
svy: mean i_pid_folded if blm==1
svy: mean i_member if blm==1
svy: mean i_r_aidimp if blm==1
svy: mean i_r_know if blm==1

sum blm i_rblack i_rlatino i_rasian i_rother i_female i_age_numeric i_educ i_income i_logdistance /*
	*/ i_r_ideo i_pid_folded i_member i_r_aidimp i_r_know Conservative_Event Month if blm==1

svy: mean i_rblack if blm==0
svy: mean i_rlatino if blm==0
svy: mean i_rasian if blm==0
svy: mean i_rother if blm==0
svy: mean i_female if blm==0
svy: mean i_age_numeric if blm==0
svy: mean i_educ if blm==0
svy: mean i_income if blm==0
svy: mean i_logdistance if blm==0
svy: mean i_r_ideo if blm==0
svy: mean i_pid_folded if blm==0
svy: mean i_member if blm==0
svy: mean i_r_aidimp if blm==0
svy: mean i_r_know if blm==0

sum blm i_rblack i_rlatino i_rasian i_rother i_female i_age_numeric i_educ i_income i_logdistance /*
	*/ i_r_ideo i_pid_folded i_member i_r_aidimp i_r_know Conservative_Event Month if blm==0

svy: reg i_rblack blm
svy: reg i_rlatino blm
svy: reg i_rasian blm
svy: reg i_rother blm
svy: reg i_female blm
svy: reg i_age_numeric blm
svy: reg i_educ blm
svy: reg i_income blm
svy: reg i_logdistance blm
svy: reg i_r_ideo blm
svy: reg i_pid_folded blm
svy: reg i_member blm
svy: reg i_r_aidimp blm
svy: reg i_r_know blm

sum blm i_rblack i_rlatino i_rasian i_rother i_female i_age_numeric i_educ i_income i_logdistance /*
	*/ i_r_ideo i_pid_folded i_member i_r_aidimp i_r_know Conservative_Event Month

svy: probit blm i_rblack i_rlatino i_rasian i_rother i_female i_age_numeric i_educ i_income i_logdistance /*
	*/ i_r_ideo i_pid_folded i_member i_r_aidimp i_r_know Conservative_Event Month

* Online Appendix A: Robustness check for Table 2

ttest i_rblack, by(blm) 
ttest i_rlatino, by(blm) 
ttest i_rasian, by(blm) 
ttest i_rother, by(blm) 
ttest i_female, by(blm) 
ttest i_age_numeric, by(blm) 
ttest i_educ, by(blm) 
ttest i_income, by(blm) 
ttest i_logdistance, by(blm)
ttest i_r_ideo, by(blm) 
ttest i_pid_folded, by(blm) 
ttest i_member, by(blm) 
ttest i_r_aidimp, by(blm) 
ttest i_r_know, by(blm) 
	
probit blm i_rblack i_rlatino i_rasian i_rother i_female i_age_numeric i_educ i_income i_logdistance /*
	*/ i_r_ideo i_pid_folded i_member i_r_aidimp i_r_know Conservative_Event Month

* Table 3: Differences in Attitudes and Political Involvement 

impute blm rblack rlatino rasian rother female age_numeric educ income logdistance r_ideo pid_folded member r_aidimp r_know Conservative_Event Month, gen(j_blm)
replace j_blm = 0 if j_blm  < 0
replace j_blm  = 1 if j_blm  > 1
impute rblack blm rlatino rasian rother female age_numeric educ income logdistance r_ideo pid_folded member r_aidimp r_know Conservative_Event Month, gen(j_rblack)
replace j_rblack = 0 if j_rblack < 0
replace j_rblack = 1 if j_rblack > 1
impute rlatino blm rblack rasian rother female age_numeric educ income logdistance r_ideo pid_folded member r_aidimp r_know Conservative_Event Month, gen(j_rlatino)
replace j_rlatino = 0 if j_rlatino < 0
replace j_rlatino = 1 if j_rlatino > 1
impute rasian blm rblack rlatino rother female age_numeric educ income logdistance r_ideo pid_folded member r_aidimp r_know Conservative_Event Month, gen(j_rasian)
replace j_rasian = 0 if j_rasian < 0
replace j_rasian = 1 if j_rasian > 1
impute rother blm rblack rlatino rasian female age_numeric educ income logdistance r_ideo pid_folded member r_aidimp r_know Conservative_Event Month, gen(j_rother)
replace j_rother = 0 if j_rother < 0 
replace j_rother = 1 if j_rother > 1
impute female blm rblack rlatino rasian rother age_numeric educ income logdistance r_ideo pid_folded member r_aidimp r_know Conservative_Event Month, gen(j_female)
replace j_female = 0 if j_female < 0
replace j_female = 1 if j_female > 1
impute age_numeric blm rblack rlatino rasian rother female educ income logdistance r_ideo pid_folded member r_aidimp r_know Conservative_Event Month, gen(j_age_numeric)
replace j_age_numeric = 0 if j_age_numeric < 0 
impute educ blm rblack rlatino rasian rother female age_numeric income logdistance r_ideo pid_folded member r_aidimp r_know Conservative_Event Month, gen(j_educ)
replace j_educ = 1 if j_educ < 1
replace j_educ = 6 if j_educ > 6
impute income blm rblack rlatino rasian rother female age_numeric educ logdistance r_ideo pid_folded member r_aidimp r_know Conservative_Event Month, gen(j_income)
replace j_income = 0 if j_income < 0
impute logdistance blm rblack rlatino rasian rother female age_numeric educ income r_ideo pid_folded member r_aidimp r_know Conservative_Event Month, gen(j_logdistance)
replace j_logdistance = 0 if j_logdistance < 0
impute r_ideo blm rblack rlatino rasian rother female age_numeric educ income logdistance pid_folded member r_aidimp r_know Conservative_Event Month, gen(j_r_ideo)
replace j_r_ideo = 1 if j_r_ideo < 1
replace j_r_ideo = 9 if j_r_ideo > 9
impute pid_folded blm rblack rlatino rasian rother female age_numeric educ income logdistance r_ideo member r_aidimp r_know Conservative_Event Month, gen(j_pid_folded)
replace j_pid_folded = 0 if j_pid_folded < 0 
replace j_pid_folded = 3 if j_pid_folded > 3 
impute member blm rblack rlatino rasian rother female age_numeric educ income logdistance r_ideo pid_folded r_aidimp r_know Conservative_Event Month, gen(j_member)
replace j_member = 1 if j_member > 1 
replace j_member = 0 if j_member < 0 
impute r_aidimp blm rblack rlatino rasian rother female age_numeric educ income logdistance r_ideo pid_folded member r_know Conservative_Event Month, gen(j_r_aidimp)
replace j_r_aidimp = 1 if j_r_aidimp < 1
replace j_r_aidimp = 4 if j_r_aidimp > 4
impute r_know blm rblack rlatino rasian rother female age_numeric educ income logdistance r_ideo pid_folded member r_aidimp Conservative_Event Month, gen(j_r_know)
replace j_r_know = 1 if i_r_know < 1 
replace j_r_know = 3 if i_r_know > 3 

svyset [pweight=weight], strata(RenumberedEvent)

svy: oprobit r_intersectionality j_blm j_rblack j_rlatino j_rasian j_rother j_female j_age_numeric j_educ j_income j_logdistance /*
	*/ j_r_ideo j_pid_folded j_member j_r_aidimp j_r_know Conservative_Event Month		
margins, at(j_blm=(0 1))
marginsplot, title (" ") ytitle(, size(large)) xtitle(, size(large)) yscale(r (0 1)) ylabel (0 0.10 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0) ytitle("Addressing Intersectionality") xtitle("Not BLM Activist                              BLM Activist")
predict r_inter_yhat, xb
predict r_inter_blm if blm==1, xb
predict r_inter_women if womensrts==1, xb
predict r_inter_climate if climate==1, xb
predict r_inter_aw if antiwar==1, xb 
predict r_inter_teaparty if teaparty==1, xb
mean r_inter_yhat
mean r_inter_blm 
mean r_inter_women
mean r_inter_climate
mean r_inter_aw
mean r_inter_teaparty
sum r_inter_yhat
sum r_inter_blm 
sum r_inter_women
sum r_inter_climate
sum r_inter_aw
sum r_inter_teaparty
	
svy: oprobit socialmedia j_blm j_rblack j_rlatino j_rasian j_rother j_female j_age_numeric j_educ j_income j_logdistance /*
	*/ j_r_ideo pid_folded j_member j_r_aidimp j_r_know Conservative_Event Month
margins, at(j_blm=(0 1))
marginsplot, title (" ") ytitle(, size(large)) xtitle(, size(large)) yscale(r (0 1)) ylabel (0 0.10 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0) ytitle("Use of Social Media") xtitle("Not BLM Activist                              BLM Activist")
predict r_socmed_yhat, xb
predict r_socmed_blm if blm==1, xb
predict r_socmed_women if womensrts==1, xb
predict r_socmed_climate if climate==1, xb
predict r_socmed_aw if antiwar==1, xb 
predict r_socmed_teaparty if teaparty==1, xb
mean r_socmed_yhat
mean r_socmed_blm 
mean r_socmed_women
mean r_socmed_climate
mean r_socmed_aw
mean r_socmed_teaparty
sum r_socmed_yhat
sum r_socmed_blm 
sum r_socmed_women
sum r_socmed_climate
sum r_socmed_aw
sum r_socmed_teaparty

svy: oprobit r_demworks j_blm j_rblack j_rlatino j_rasian j_rother j_female j_age_numeric j_educ j_income j_logdistance /*
	*/ j_r_ideo j_pid_folded j_member j_r_aidimp j_r_know Conservative_Event Month	
margins, at(j_blm=(0 1))
marginsplot, title (" ") ytitle(, size(large)) xtitle(, size(large)) yscale(r (0 1)) ylabel (0 0.10 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0) ytitle("Satisfaction with US Democracy") xtitle("Not BLM Activist                              BLM Activist")
predict r_dw_yhat, xb
predict r_dw_blm if blm==1, xb
predict r_dw_women if womensrts==1, xb
predict r_dw_climate if climate==1, xb
predict r_dw_aw if antiwar==1, xb 
predict r_dw_teaparty if teaparty==1, xb
mean r_dw_yhat
mean r_dw_blm 
mean r_dw_women
mean r_dw_climate
mean r_dw_aw
mean r_dw_teaparty
sum r_dw_yhat
sum r_dw_blm 
sum r_dw_women
sum r_dw_climate
sum r_dw_aw
sum r_dw_teaparty

svy: oprobit violencejust j_blm j_rblack j_rlatino j_rasian j_rother j_female j_age_numeric j_educ j_income j_logdistance /*
	*/ j_r_ideo j_pid_folded j_member j_r_aidimp j_r_know Conservative_Event Month	
margins, at(j_blm=(0 1))
marginsplot, title (" ") ytitle(, size(large)) xtitle(, size(large)) yscale(r (0 1)) ylabel (0 0.10 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0) ytitle("Violence is Justified") xtitle("Not BLM Activist                              BLM Activist")
predict r_vj_yhat, xb
predict r_vj_blm if blm==1, xb
predict r_vj_women if womensrts==1, xb
predict r_vj_climate if climate==1, xb
predict r_vj_aw if antiwar==1, xb 
predict r_vj_teaparty if teaparty==1, xb
mean r_vj_yhat 
mean r_vj_blm 
mean r_vj_women
mean r_vj_climate
mean r_vj_aw
mean r_vj_teaparty
sum r_vj_yhat 
sum r_vj_blm 
sum r_vj_women
sum r_vj_climate
sum r_vj_aw
sum r_vj_teaparty
	
svy: oprobit r_ang j_blm j_rblack j_rlatino j_rasian j_rother j_female j_age_numeric j_educ j_income j_logdistance /*
	*/ j_r_ideo j_pid_folded j_member j_r_aidimp j_r_know Conservative_Event Month
margins, at(j_blm=(0 1))
marginsplot, title (" ") ytitle(, size(large)) xtitle(, size(large)) yscale(r (0 1)) ylabel (0 0.10 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0) ytitle("Anger") xtitle("Not BLM Activist                              BLM Activist")
predict r_ang_yhat, xb
predict r_ang_blm if blm==1, xb
predict r_ang_women if womensrts==1, xb
predict r_ang_climate if climate==1, xb
predict r_ang_aw if antiwar==1, xb 
predict r_ang_teaparty if teaparty==1, xb
mean r_ang_yhat
mean r_ang_blm 
mean r_ang_women
mean r_ang_climate
mean r_ang_aw
mean r_ang_teaparty
sum r_ang_yhat
sum r_ang_blm 
sum r_ang_women
sum r_ang_climate
sum r_ang_aw
sum r_ang_teaparty

mean r_intersectionality
mean socialmedia 
mean r_demworks
mean violencejust
mean r_ang

svy: mean r_intersectionality
svy: mean socialmedia 
svy: mean r_demworks
svy: mean violencejust
svy: mean r_ang

sum r_intersectionality socialmedia r_demworks violencejust r_ang 

* Online Appendix B: Robustness check for Table 3

oprobit r_intersectionality j_blm j_rblack j_rlatino j_rasian j_rother j_female j_age_numeric j_educ j_income j_logdistance /*
	*/ j_r_ideo j_pid_folded j_member j_r_aidimp j_r_know Conservative_Event Month		
margins, at(j_blm=(0 1))
marginsplot, title (" ") ytitle(, size(large)) xtitle(, size(large)) yscale(r (0 1)) ylabel (0 0.10 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0) ytitle("Addressing Intersectionality") xtitle("Not BLM Activist                              BLM Activist")
	
oprobit socialmedia j_blm j_rblack j_rlatino j_rasian j_rother j_female j_age_numeric j_educ j_income j_logdistance /*
	*/ j_r_ideo pid_folded j_member j_r_aidimp j_r_know Conservative_Event Month
margins, at(j_blm=(0 1))
marginsplot, title (" ") ytitle(, size(large)) xtitle(, size(large)) yscale(r (0 1)) ylabel (0 0.10 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0) ytitle("Use of Social Media") xtitle("Not BLM Activist                              BLM Activist")
		
oprobit r_demworks j_blm j_rblack j_rlatino j_rasian j_rother j_female j_age_numeric j_educ j_income j_logdistance /*
	*/ j_r_ideo j_pid_folded j_member j_r_aidimp j_r_know Conservative_Event Month	
margins, at(j_blm=(0 1))
marginsplot, title (" ") ytitle(, size(large)) xtitle(, size(large)) yscale(r (0 1)) ylabel (0 0.10 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0) ytitle("Satisfaction with US Democracy") xtitle("Not BLM Activist                              BLM Activist")

oprobit violencejust j_blm j_rblack j_rlatino j_rasian j_rother j_female j_age_numeric j_educ j_income j_logdistance /*
	*/ j_r_ideo j_pid_folded j_member j_r_aidimp j_r_know Conservative_Event Month	
margins, at(j_blm=(0 1))
marginsplot, title (" ") ytitle(, size(large)) xtitle(, size(large)) yscale(r (0 1)) ylabel (0 0.10 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0) ytitle("Violence is Justified") xtitle("Not BLM Activist                              BLM Activist")
	
oprobit r_ang j_blm j_rblack j_rlatino j_rasian j_rother j_female j_age_numeric j_educ j_income j_logdistance /*
	*/ j_r_ideo j_pid_folded j_member j_r_aidimp j_r_know Conservative_Event Month
margins, at(j_blm=(0 1))
marginsplot, title (" ") ytitle(, size(large)) xtitle(, size(large)) yscale(r (0 1)) ylabel (0 0.10 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0) ytitle("Anger") xtitle("Not BLM Activist                              BLM Activist")

oprobit r_intersectionality j_blm
oprobit socialmedia j_blm 
oprobit r_demworks j_blm 
oprobit violencejust j_blm 
oprobit r_ang j_blm

* Table 4, Model 1 See replication materials for the March for Racial Justice (MFRJ) data.

* Table 4, Model 2: How do Black-identified Black Lives Matter activists differ from allies to Black Lives Matter?

generate j_nonblack = 1 - j_rblack

svy: oprobit r_intersectionality j_nonblack j_female j_age_numeric j_educ j_income j_logdistance /*
	*/ j_r_ideo j_pid_folded j_member j_r_aidimp j_r_know Month if blm==1 & Conservative_Event==0

svy: oprobit socialmedia j_nonblack j_female j_age_numeric j_educ j_income j_logdistance /*
	*/ j_r_ideo j_pid_folded j_member j_r_aidimp j_r_know Month if blm==1 & Conservative_Event==0

svy: oprobit r_demworks j_nonblack j_female j_age_numeric j_educ j_income j_logdistance /*
	*/ j_r_ideo j_pid_folded j_member j_r_aidimp j_r_know Month if blm==1 & Conservative_Event==0

svy: oprobit violencejust j_nonblack i_female i_age_numeric i_educ i_income i_logdistance /*
	*/ j_r_ideo j_pid_folded j_member j_r_aidimp j_r_know Month if blm==1 & Conservative_Event==0
	
svy: oprobit r_ang j_nonblack j_female j_age_numeric j_educ j_income j_logdistance /*
	*/ j_r_ideo j_pid_folded j_member j_r_aidimp j_r_know Month if blm==1 & Conservative_Event==0
	
svy: mean r_intersectionality if blm==1 & Conservative_Event==0
svy: mean socialmedia if blm==1 & Conservative_Event==0
svy: mean r_demworks if blm==1 & Conservative_Event==0
svy: mean violencejust if blm==1 & Conservative_Event==0
svy: mean r_ang if blm==1 & Conservative_Event==0
sum r_intersectionality socialmedia r_demworks violencejust r_ang if blm==1 & Conservative_Event==0

* Table 4, Model 3: Is there a cleavage withing BLM baased on activist background?
	
generate FE_AnyProBlack = FE_BLM + FE_ProBlackAntiRacism

impute FE_AnyProBlack blm rblack rlatino rasian rother female age_numeric educ income logdistance r_ideo pid_folded member r_aidimp r_know Conservative_Event Month, gen(j_FE_AnyProBlack)
replace j_FE_AnyProBlack = 0 if j_FE_AnyProBlack < 0
replace j_FE_AnyProBlack = 1 if j_FE_AnyProBlack > 1

svy: oprobit r_intersectionality j_FE_AnyProBlack j_rblack j_female j_age_numeric j_educ j_income j_logdistance /*
	*/ j_r_ideo j_pid_folded j_member j_r_aidimp j_r_know Month if blm==1 & Conservative_Event==0

svy: oprobit socialmedia j_FE_AnyProBlack j_rblack j_female j_age_numeric j_educ j_income j_logdistance /*
	*/ j_r_ideo j_pid_folded j_member j_r_aidimp j_r_know Month if blm==1 & Conservative_Event==0

svy: oprobit r_demworks j_FE_AnyProBlack j_rblack j_female j_age_numeric j_educ j_income j_logdistance /*
	*/ j_r_ideo j_pid_folded j_member j_r_aidimp j_r_know Month if blm==1 & Conservative_Event==0

svy: oprobit violencejust j_FE_AnyProBlack j_rblack i_female i_age_numeric i_educ i_income i_logdistance /*
	*/ j_r_ideo j_pid_folded j_member j_r_aidimp j_r_know Month if blm==1 & Conservative_Event==0
	
svy: oprobit r_ang j_FE_AnyProBlack j_rblack j_female j_age_numeric j_educ j_income j_logdistance /*
	*/ j_r_ideo j_pid_folded j_member j_r_aidimp j_r_know Month if blm==1 & Conservative_Event==0

* Multidimensional scaling

matrix A = (0,0.448949377,0.418335917,0.398314661,2.202530608\ /*
	*/ 0.448949377,0,0.039716133,0.082139134,1.753581231\ /*
	*/ 0.418335917,0.039716133,0,0.045602651,1.784194691\ /*
	*/ 0.398314661,0.082139134,0.045602651,0,1.804215946\ /*
	*/ 2.202530608,1.753581231,1.784194691,1.804215946,0)
	
matrix list A

mdsmat A

estat config
	
log close
